home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsIProxyAutoConfig.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  155 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIProxyAutoConfig.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIProxyAutoConfig_h__
  6. #define __gen_nsIProxyAutoConfig_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIProxyAutoConfig */
  19. #define NS_IPROXYAUTOCONFIG_IID_STR "a42619df-0a1c-46fb-8154-0e9b8f8f1ea8"
  20.  
  21. #define NS_IPROXYAUTOCONFIG_IID \
  22.   {0xa42619df, 0x0a1c, 0x46fb, \
  23.     { 0x81, 0x54, 0x0e, 0x9b, 0x8f, 0x8f, 0x1e, 0xa8 }}
  24.  
  25. /** 
  26.  * The nsIProxyAutoConfig interface is used for setting arbitrary proxy
  27.  * configurations based on the specified URL. 
  28.  *
  29.  * Note this interface wraps (at least in the implementation) the older
  30.  * hacks of proxy auto config. 
  31.  *
  32.  *  - Gagan Saksena 04/23/00 
  33.  */
  34. class NS_NO_VTABLE nsIProxyAutoConfig : public nsISupports {
  35.  public: 
  36.  
  37.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROXYAUTOCONFIG_IID)
  38.  
  39.   /**
  40.      * This method initializes the object.  This method may be called multiple
  41.      * times.  If either parameter is an empty value, then the object is
  42.      * reset to its initial state.
  43.      *
  44.      * @param aPACURI
  45.      *        URI used to fetch the PAC script.  This is needed for properly
  46.      *        constructing the JS sandbox used to evaluate the PAC script.
  47.      * @param aPACScript
  48.      *        Javascript program text.
  49.      */
  50.   /* void init (in ACString aPACURI, in AString aPACScript); */
  51.   NS_IMETHOD Init(const nsACString & aPACURI, const nsAString & aPACScript) = 0;
  52.  
  53.   /**
  54.      * Get the proxy string for the specified URI.  The proxy string is
  55.      * given by the following:
  56.      *   
  57.      *   result      = proxy-spec *( proxy-sep proxy-spec )
  58.      *   proxy-spec  = direct-type | proxy-type LWS proxy-host [":" proxy-port]
  59.      *   direct-type = "DIRECT"
  60.      *   proxy-type  = "PROXY" | "SOCKS" | "SOCKS4" | "SOCKS5"
  61.      *   proxy-sep   = ";" LWS
  62.      *   proxy-host  = hostname | ipv4-address-literal
  63.      *   proxy-port  = <any 16-bit unsigned integer>
  64.      *   LWS         = *( SP | HT )
  65.      *   SP          = <US-ASCII SP, space (32)>
  66.      *   HT          = <US-ASCII HT, horizontal-tab (9)>
  67.      *
  68.      * NOTE: direct-type and proxy-type are case insensitive
  69.      * NOTE: SOCKS implies SOCKS4
  70.      *
  71.      * Examples:
  72.      *   "PROXY proxy1.foo.com:8080; PROXY proxy2.foo.com:8080; DIRECT"
  73.      *   "SOCKS socksproxy"
  74.      *   "DIRECT"
  75.      *
  76.      * XXX add support for IPv6 address literals.
  77.      * XXX quote whatever the official standard is for PAC.
  78.      *
  79.      * @param aTestURI
  80.      *        The URI as an ASCII string to test.
  81.      * @param aTestHost
  82.      *        The ASCII hostname to test.
  83.      *
  84.      * @return PAC result string as defined above.
  85.      */
  86.   /* ACString getProxyForURI (in ACString aTestURI, in ACString aTestHost); */
  87.   NS_IMETHOD GetProxyForURI(const nsACString & aTestURI, const nsACString & aTestHost, nsACString & _retval) = 0;
  88.  
  89. };
  90.  
  91. /* Use this macro when declaring classes that implement this interface. */
  92. #define NS_DECL_NSIPROXYAUTOCONFIG \
  93.   NS_IMETHOD Init(const nsACString & aPACURI, const nsAString & aPACScript); \
  94.   NS_IMETHOD GetProxyForURI(const nsACString & aTestURI, const nsACString & aTestHost, nsACString & _retval); 
  95.  
  96. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  97. #define NS_FORWARD_NSIPROXYAUTOCONFIG(_to) \
  98.   NS_IMETHOD Init(const nsACString & aPACURI, const nsAString & aPACScript) { return _to Init(aPACURI, aPACScript); } \
  99.   NS_IMETHOD GetProxyForURI(const nsACString & aTestURI, const nsACString & aTestHost, nsACString & _retval) { return _to GetProxyForURI(aTestURI, aTestHost, _retval); } 
  100.  
  101. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  102. #define NS_FORWARD_SAFE_NSIPROXYAUTOCONFIG(_to) \
  103.   NS_IMETHOD Init(const nsACString & aPACURI, const nsAString & aPACScript) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aPACURI, aPACScript); } \
  104.   NS_IMETHOD GetProxyForURI(const nsACString & aTestURI, const nsACString & aTestHost, nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProxyForURI(aTestURI, aTestHost, _retval); } 
  105.  
  106. #if 0
  107. /* Use the code below as a template for the implementation class for this interface. */
  108.  
  109. /* Header file */
  110. class nsProxyAutoConfig : public nsIProxyAutoConfig
  111. {
  112. public:
  113.   NS_DECL_ISUPPORTS
  114.   NS_DECL_NSIPROXYAUTOCONFIG
  115.  
  116.   nsProxyAutoConfig();
  117.  
  118. private:
  119.   ~nsProxyAutoConfig();
  120.  
  121. protected:
  122.   /* additional members */
  123. };
  124.  
  125. /* Implementation file */
  126. NS_IMPL_ISUPPORTS1(nsProxyAutoConfig, nsIProxyAutoConfig)
  127.  
  128. nsProxyAutoConfig::nsProxyAutoConfig()
  129. {
  130.   /* member initializers and constructor code */
  131. }
  132.  
  133. nsProxyAutoConfig::~nsProxyAutoConfig()
  134. {
  135.   /* destructor code */
  136. }
  137.  
  138. /* void init (in ACString aPACURI, in AString aPACScript); */
  139. NS_IMETHODIMP nsProxyAutoConfig::Init(const nsACString & aPACURI, const nsAString & aPACScript)
  140. {
  141.     return NS_ERROR_NOT_IMPLEMENTED;
  142. }
  143.  
  144. /* ACString getProxyForURI (in ACString aTestURI, in ACString aTestHost); */
  145. NS_IMETHODIMP nsProxyAutoConfig::GetProxyForURI(const nsACString & aTestURI, const nsACString & aTestHost, nsACString & _retval)
  146. {
  147.     return NS_ERROR_NOT_IMPLEMENTED;
  148. }
  149.  
  150. /* End of implementation class template. */
  151. #endif
  152.  
  153.  
  154. #endif /* __gen_nsIProxyAutoConfig_h__ */
  155.